#pragma once

#include <QObject>
#include <QThread>
extern "C"
{
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libswscale/swscale.h>
}
#include <iostream>

class RGB2MP4Thread : protected QThread
{
public:
	//const char *infile = "out.rgb";
	//const char *outfile = "rgb.mp4";
	QString inFile;
	QString outFile;
	int width = 848;
	int height = 480;
	int fps = 25;
public:
	void run() override;
	void Start();
	void Stop();

	static RGB2MP4Thread* Get()
	{
		static RGB2MP4Thread rmt;
		return &rmt;
	}
	virtual ~RGB2MP4Thread();

protected:
	RGB2MP4Thread();
	
};
